import push
import get_weather
import get_twitter
import waring
def main():
    SCKEY = "SCT134645TpmkfGNZDSfsjCYWJYRMJtcWZ"
    SCKEY1 = "SCT81255ToIGoOgsPnw83g429zrb6dkc9"   #  本人

    # 获取目标城市：温度temperature, 湿度humidity, 天气info, 风量power, 空气质量aqi
    temperature, humidity, info, power, aqi = get_weather.weahter("杭州")
    city_waring, sky_type = waring.get_war()

    # 信息处理
    title, twitter = get_twitter.information(temperature, humidity, info, power, aqi)
    sky_type += title
    city_waring += twitter

    # server酱推送
    twitter = city_waring
    title = sky_type
    push.server_push(SCKEY1, twitter, title)    # server酱 推送（密钥，主体内容，标题）
    push.server_push(SCKEY , twitter, title)    # server酱 推送（密钥，主体内容，标题）
    print(twitter)
if __name__ == "__main__":
    main()